<form class="form-horizontal" action="{{$actionUrl}}" method="POST">
    @csrf
<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">小说名称</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" id="novelname" name="novelname" placeholder="请输入小说名称" value="{{$novel->novelname??''}}"
        />
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">小说拼音化</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" id="novelpy" name="novelpy" placeholder="为空自动拼音化" value="{{$novel->novelpy??''}}" />
    </div>
</div>


<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">小说作者</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" id="novelauthor" name="novelauthor" placeholder="请输入小说作者" value="{{$novel->novelauthor??''}}"
        />
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">小说简介</label>
    <div class="col-sm-10">
        <textarea placeholder="请输入小说简介" id="noveldes" name="noveldes">{{$novel->noveldes??''}}</textarea>
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">小说分类 </label>
    <div class="col-sm-10">
        <select class="span8" name="novel_cid" id="novel_cid">
                    
                    @foreach ($cateList as $c)
                    <option value='{{$c->id}}' 
                        @if (isset($novel)&&$c->id===$novel->novel_cid)
                            selected="selected"
                        @endif
                         >{{$c->classname}}</option> 
                    @endforeach
                       
                        </select>

    </div>
</div>


<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">小说状态</label>
    <div class="col-sm-10">

        <label class="checkbox inline">
                        <input type="radio" id="novelstate" name="novelstate" value="0" class="fancy"
                        @if (isset($novel)&&$novel->novelstate===0)
                        checked="checked"
                        @endif
                         
                         /> 连载中 
                    </label>
        <label class="checkbox inline">
                        <input type="radio" id="novelstate" name="novelstate" value="1" class="fancy"
                        @if (isset($novel)&&$novel->novelstate===1)
                        checked="checked"
                        @endif
                         /> 已完本
                    </label>


    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">今日点击</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" id="clicktoday" name="clicktoday" placeholder="初始今日点击" value="{{$novel->clicktoday??''}}"
        />
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">本月点击</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" id="clickmonth" name="clickmonth" placeholder="初始本月点击" value="{{$novel->clickmonth??''}}"
        />
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">总点击</label>
    <div class="col-sm-10">
        <input type="text" class="form-control" id="clicksum" name="clicksum" placeholder="总共点击次数" value="{{$novel->clicksum??''}}" />
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="inputEmail">上传封面</label>
    <div class="col-sm-10">
        @if (isset($novel)&&is_null($novel->novelimg))
        <input type="file" name="novelimg" id="novelimg" />
           @else 
           <input type="text" name="novelimg" id="novelimg" value="{{$novel->novelimg??'nopic.jpg'}}"/>
           <input type="file" id="novelimg1" />
        @endif
    
    </div>
</div>




<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
    <button type="submit" id="submit" class="btn btn-primary">保存</button>
</div>
</form>